Ext.define('RDB.models.SparePartsModel',{
	extend: 'Ext.data.Model',
	fields: [{
		name: 'id',
		type: 'int'
	},{
		name: 'code',
		type: 'int'
	},{
		name: 'description',
		type: 'string'
	},{
		name: 'description_rus',
		type: 'string'
	},{
		name: 'integer',
		type: 'bool'
	},{
		name: 'models',
		type: 'string'
	},{
		name: 'unit',
		type: 'string'
	},{
		name: 'safety_stock',
		type: 'float'
	},{
		name: 'planning_type',
		type: 'int'
	},{
		name: 'planning_condition',
		type: 'int'
	}],
	proxy: {
		type: 'ajax',
		url: '/bin/web_api/spare_parts.py/get_spare_parts_list',
		reader: {
			type: 'json',
			root: 'spare_parts_list',
			totalProperty: 'count',
			successProperty: 'success'
		}
	}
});
